package com.ssy.lingxi.platform.manage.model.request.content;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

/**
 * 资讯管理 - 新增/修改 - 请求实体类
 * @author fhj
 * @version 2.0.0
 * @date 2020/9/18
 */
@Data
public class ContentInformationRequest {

    @ApiModelProperty(value = "主键id")
    @NotNull(message = "主键id不能为空", groups = {ContentInformationRequest.Update.class})
    private Long id;

    @ApiModelProperty(value = "标题")
    @NotEmpty(message = "标题不能为空", groups = {ContentInformationRequest.Add.class, ContentInformationRequest.Update.class})
    private String title;

    @ApiModelProperty(value = "栏目id")
    @NotNull(message = "栏目id不能为空", groups = {ContentInformationRequest.Add.class, ContentInformationRequest.Update.class})
    private Long columnId;

    @ApiModelProperty(value = "栏目分类：1.市场行情；2.资讯；")
    @NotNull(message = "栏目分类不能为空", groups = {ContentInformationRequest.Add.class, ContentInformationRequest.Update.class})
    private Integer type;

    @ApiModelProperty(value = "推荐标签 1-头条文章 2-轮播新闻 3-图片新闻 4-推荐阅读 5-行情推荐 6-本栏推荐")
    private Integer recommendLabel;

    @ApiModelProperty(value = "排序")
    private  Integer sort;

    @ApiModelProperty(value = "初始浏览数")
    private Integer readCount = 0;

    @ApiModelProperty(value = "一级分类ID")
    private Long firstCategoryId;

    @ApiModelProperty(value = "二级分类ID")
    private Long secondCategoryId;

    @ApiModelProperty(value = "三级分类ID")
    private Long thirdlyCategoryId;

    @ApiModelProperty(value = "一级分类名称")
    private String firstCategoryName;

    @ApiModelProperty(value = "二级分类名称")
    private String secondCategoryName;

    @ApiModelProperty(value = "三级分类名称")
    private String thirdlyCategoryName;

    @ApiModelProperty(value = "标签ID集合")
    private List<Long> labelIds;

    @ApiModelProperty(value = "图片地址")
    @NotNull(message = "图片地址不能为空", groups = {ContentInformationRequest.Add.class, ContentInformationRequest.Update.class})
    private String imageUrl;

    @ApiModelProperty(value = "摘要")
    @NotEmpty(message = "摘要不能为空", groups = {ContentInformationRequest.Add.class, ContentInformationRequest.Update.class})
    private String digest;

    @ApiModelProperty(value = "内容")
    @NotEmpty(message = "内容不能为空", groups = {ContentInformationRequest.Add.class, ContentInformationRequest.Update.class})
    private String content;

    public interface Add {
    }

    public interface Update {
    }
}
